home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10310 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.0 KB  |  52 lines

  1. Path: cs.tu-berlin.de!news
  2. From: Roman Lechtchinsky <wolfro@cs.tu-berlin.de>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP!!! Syntax error!
  5. Date: Thu, 07 Mar 1996 16:52:44 +0100
  6. Organization: Technical University of Berlin
  7. Message-ID: <313F064C.36E4@cs.tu-berlin.de>
  8. References: <4hmufg$7fq@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: 130.149.17.231
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. DJMintz wrote:
  16. > Okay, here is the code I am trying to compile. The error I am getting is:
  17. > Error fade.c 44: ) expected. Here is the code. Please see if you can fix
  18. > it:
  19. > [...]
  20. >
  21. > main(argc,*argv[])     < ---- ERROR OCCURS HERE, ON LINE 44! Please help!
  22. > {
  23. >         int argc;
  24. >                char *argv[];
  25. >
  26. > [...]
  27.  
  28. You have to change this either to
  29.  
  30. int main( int argc, char *argv[] )
  31. {
  32. ...
  33. }
  34.  
  35. or to
  36.  
  37. int main( argc, argv )
  38. int argc;
  39. char *argv[];
  40. {
  41. ...
  42. }
  43.  
  44. The second version is rather old-fashioned and should not be used.
  45.  
  46. Bye
  47.  
  48. Roman
  49.